package com.sunny.design.observer.guava.gper;

import com.google.common.eventbus.EventBus;

/**
 * @author Sunny
 * @date 2020/3/23
 */
public class GPer extends EventBus {
    private String name = "咕泡社区";
    private static final GPer GPER = new GPer();

    public static GPer getInstance() {
        return GPER;
    }

    public String getName() {
        return name;
    }

    public void publishQuestion(Question question) {
        System.out.println(question.getUserName() + "在" + getName() + "上发布了一个问题！");
        this.post(question);
    }
}
